package cn.yunhe.dao;


import cn.yunhe.entity.ExamPaper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ExamPaperDao {


    /**
     * 根据知识点分类分页模糊查询试卷
     * @return
     * author:guohanyu
     */
    List<ExamPaper> getPapersByFieldAndPointAndName(Map<String, Object> map);

    /**
     * 根据知识点分类分页模糊查询试卷总记录数
     * @return
     * author:guohanyu
     */
    Integer getPapersByFieldAndPointAndNameCount(Map<String, Object> map);

    /**
     * 将发布考试相关信息存入试卷表
     * @param examPaper
     * @return
     * guohanyu
     */
    boolean addExamPaper(ExamPaper examPaper);

    /**
     * 根据Id获取试卷信息
     * @param examPaperId
     * @return
     * guohanyuu
     */
    ExamPaper getExamPaperById(Integer examPaperId);

    /**
     * 根据传入试卷Id集合,批量删除试卷
     * @param examPaperIdList
     * @return
     * guohanyu
     */
    boolean delExamPaperById(@Param("examPaperIdList") List<Integer> examPaperIdList);

    /**
     * 查询所有试卷
     * @return
     */
    int getPaperCount();


    /**
     * 根据传入试卷Id,题目类型,修改相应题目数目,和相应题目分数,以及试卷总分数
     * @param
     * @return
     */
    boolean removeQuestionFromExamPaper(ExamPaper examPaper);
}